ENet v1.3.13 Reliable UDP networking library

- Home
- Features
- Downloads
- Installation
- Tutorial
- Mailing List
- IRC Channel
- FAQ
- License
- Documentation

- Functions
- Data Structures
- Files
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Data Fields
ENetCompressor Struct Reference

An ENet packet compressor for compressing UDP packets before socket sends or receives. More...

`#include <enet.h>`

## Data Fields
size_t(* | compress )(void *context, const ENetBuffer *inBuffers, size_t inBufferCount, size_t inLimit, enet_uint8 *outData, size_t outLimit)
| Compresses from inBuffers[0:inBufferCount-1], containing inLimit bytes, to outData, outputting at most outLimit bytes. More...
void * | context
| Context data for the compressor. More...
size_t(* | decompress )(void *context, const enet_uint8 *inData, size_t inLimit, enet_uint8 *outData, size_t outLimit)
| Decompresses from inData, containing inLimit bytes, to outData, outputting at most outLimit bytes. More...
void(* | destroy )(void *context)
| Destroys the context when compression is disabled or the host is destroyed. More...

## Detailed Description

An ENet packet compressor for compressing UDP packets before socket sends or receives.

## Field Documentation

size_t( * ENetCompressor::compress)(void *context, const ENetBuffer *inBuffers, size_t inBufferCount, size_t inLimit, enet_uint8 *outData, size_t outLimit)

Compresses from inBuffers[0:inBufferCount-1], containing inLimit bytes, to outData, outputting at most outLimit bytes.

Should return 0 on failure.

void* ENetCompressor::context

Context data for the compressor.

Must be non-NULL.

size_t( * ENetCompressor::decompress)(void *context, const enet_uint8 *inData, size_t inLimit, enet_uint8 *outData, size_t outLimit)

Decompresses from inData, containing inLimit bytes, to outData, outputting at most outLimit bytes.

Should return 0 on failure.

void( * ENetCompressor::destroy)(void *context)

Destroys the context when compression is disabled or the host is destroyed.

May be NULL.

The documentation for this struct was generated from the following file:

- include/enet/enet.h